package com.tj.bo.user.server.dao.impl;

import com.fqgj.common.base.AbstractBaseMapper;
import com.fqgj.common.datasource.DataSource;
import com.tj.bo.user.server.dao.UserThirdPartDao;
import com.tj.bo.user.server.entity.UserThirdPartEntity;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.Map;

/**
 * User: anonymous
 * Date: 2020-06-10
 * Time: 15:40:06.992
 */
@DataSource("dataSourceUser")
@Repository
public class UserThirdPartDaoImpl extends AbstractBaseMapper<UserThirdPartEntity> implements UserThirdPartDao {

    @Override
    public UserThirdPartEntity selectUserThirdPartByOpenId(Integer type, String openId) {
        Map<String, Object> params = new HashMap<>();
        params.put("openId", openId);
        params.put("registerType", type);
        return getSqlSession().selectOne(this.getStatement("selectUserThirdPartByOpenId"), params);
    }
}